<form action="" class="form-horizontal" role="form">
<div>
	<button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/save">保存更改</button>
</div>
<table class="table table-hover">
	<thead>
		<tr>
			<th>ID</th>
			<th>头衔名</th>
			<th>别名</th>
			<td>操作</td>
		</tr>
	</thead>
	<tbody>
		<volist name="jobTitleList" id="vo">
			<tr>
				<td>{$vo.id}</td>
				<td>{$vo.name}</td>
				<td>
					<div class="col-sm-5">
					 	<input type="hidden" name="jobTitle[{$vo.id}][id]" value="{$vo.id}" />
					 	<input type="hidden" name="jobTitle[{$vo.id}][type]" value="{$vo.id}" />
						<input type="text" class="form-control" name="jobTitle[{$vo.id}][aliasName]" value="{$vo.aliasName}" />
						<if condition="$vo['hasLevel']">
						<!--弹出窗口-->
						<div class="modal fade" id="editProvinceModal-{$vo.id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
						   	<div class="modal-dialog modal-lg">
						   		<div class="modal-content">
						   			<div class="modal-header">
						   				<h4 class="modal-title" id="myModalLabel">各级{$vo.name}头衔设置</h4>
						   			</div>
						   			<div class="modal-body">
						   				<ul class="title-list">
						   					<foreach item="vo0" name="vo['levelAlias']" key="i">
						   					<li>
						   						等级{$i+1}别名: <input name="jobTitle[{$vo.id}][levelAlias][{$i}]" value="{$vo0}" />
						   					</li>
						   					</foreach>
						   				</ul>
						   			</div>
						   			<div class="modal-footer">
						   				<button type="button" class="btn btn-success">确定</button>
						   			</div>
						   		</div>
						   	</div>
						</div>
						<script type="text/javascript">
							$("#editProvinceModal-{$vo.id}").find(".btn-success").click(function() {
								$("#editProvinceModal-{$vo.id}").modal("hide");
							});
							$(function() {
								$("#btn-edit-{$vo.id}").click(function() {
									console.log("sdfsdf");
									$("#editProvinceModal-{$vo.id}").modal();
								});
							});
						</script>
						</if>
					</div>
				</td>
				<td>
				  <if condition="$vo['hasLevel']">
					<input type="button" value="编辑等级别名" class="btn btn-info" id="btn-edit-{$vo.id}"/>
				  </if>
				</td>
			</tr>
		</volist>
	</tbody>
</table>
</form>

